
const routes = [
    //一级
    //主页
    {
      path: '/first',
      name: 'first',
      component: () => import('../views/first.vue'),
      //二级
      children:[
        {
          path:'/first/index',
          name:'index',
          component:() => import('../views/home/index.vue')
        },
        //定向二级
        {
          path:'/first',
          redirect:'/first/index'
        }
      ]
    },
    // //登录
    // {
    //   path:'/login',
    //   name:'login',
    //   component:() => import('../views/login/login.vue')
    // },
    // //注册
    // {
    //   path:'/register',
    //   name:'register',
    //   component:() => import('../views/register/register.vue')
    // },
    //一级定向
    {
      path:'/',
      redirect:'/first'
    },
    //一级404
    {
      path:'*',
      component:() => import('../views/404.vue')
    }
    
]

export default routes;